import { SvrCfg } from 'kilom';

/**
 * 环境类型
 */
export enum EnvType {
    development = "development"
}

/**
 * 服务器类型
 */
export enum SvrType {
    master = "master",
    gate = "gate",
    connector = "connector",
    game = "game",
}

export const connectorIdDic = {
    1: SvrType.connector + "-1",
    2: SvrType.connector + "-2"
}

export const gameIdDic = {
    1: SvrType.game + "-1",
    2: SvrType.game + "-2"
}

export default {
    [EnvType.development]: {
        [SvrType.master]: { id: SvrType.master, host: "localhost", port: 6606 },
        servers: {
            [SvrType.gate]: [{ id: SvrType.gate, host: "localhost", port: 6000, clientPort: 8000 }],
            [SvrType.connector]: [
                { id: connectorIdDic[1], host: "localhost", port: 6001, clientPort: 8001 },
                { id: connectorIdDic[2], host: "localhost", port: 6002, clientPort: 8002 }
            ],
            [SvrType.game]: [
                { id: gameIdDic[1], host: "localhost", port: 6100, args: { sid: 1, name: "kilom1服", openTime: "2022-08-01" } },
                { id: gameIdDic[2], host: "localhost", port: 6101, args: { sid: 2, name: "kilom2服", openTime: "2022-08-02" } },
            ]
        }
    }
} as SvrCfg;